package models

import (
	"github.com/jinzhu/gorm"
	"time"
)

type User struct {
	gorm.Model
	Name     string
	NickName string `gorm:"size:50"`
	Avatar string `gorm:size:500` //头像
	Disable bool `gorm:"default:false"`
	DisableAt *time.Time
	Freezing  bool `gorm:"default:false"`
	FreezeAt *time.Time
	Deleted bool `gorm:"default:false"`
	LoginRetryTimes int `gorm:"default:0"`
	LastLoginAt *time.Time
	Accounts []Account `gorm:"foreignkey:userId"`
	Roles []Role `gorm:"many2many:user_roles"`
}
